{% extends "admin_base.html" %}
{% block title %}明日方舟公开招募计算器后台{% endblock %}
{% block features %}
 {% for message in get_flashed_messages() %}
    <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message }}
    </div>
{% endfor %}
<div class="row">
    <div class="col-md-12">
        <form id="addform" action="{{url_for('admin_userAdd')}}" method="post">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
        <div class="ark-user">
        <ul>
            <li>
                <span>用户名:</span>
                <input type="text" name="user"  class="ark-input" title="由数字和26个英文字母组成的字符串" pattern="^[A-Za-z0-9]+$" required="required" placeholder="用户名" >
            </li>
            <li>
                <span>密码:</span>
                <input type="password" name="password" class="ark-input" required="required" placeholder="密码" title="以字母开头，长度在6~18之间，只能包含字母、数字和下划线" pattern="^[a-zA-Z]\w{5,17}$" >
            </li>
            <li>
                <span>密码确认:</span>
                <input type="password" name="repassword" class="ark-input" required="required" placeholder="再输一次密码" title="以字母开头，长度在6~18之间，只能包含字母、数字和下划线" pattern="^[a-zA-Z]\w{5,17}$" >
            </li>
            <li>
                <span>邮箱:</span>
                <input type="text" name="email" class="ark-input" required="required" placeholder="输入邮箱地址" title="邮箱格式不对" pattern="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"  >
            </li>
            <li>
                <span>角色:</span>
                <select class="ark-input" name="role">
                    <option value="1">管理员</option>
                    <option value="0">用户</option>
                </select>
            </li>
            <li>
                <span></span><input type="submit" class="btn btn-primary" value="添 加">
            </li>
        </ul>
        </div>
    </form>
    </div>
</div>


{% endblock %}